Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mesheryctl] Fall back to stable release #1886

Closed

Conversation

da0p
Copy link

@da0p da0p commented Aug 25, 2024

This PR fixes:
build-and-release-stable.yml only builds tar if the tags do not contain the suffices: patch, alpha, beta, rc. However, [install] (https://github.com/meshery/meshery.io/blob/master/install) script in meshery.io only strips the patch suffix, leading to being unable to install meshery if there is no tar of the same version, for example

  • Latest tag v0.8.0-alpha.1 -> no stripping suffix, latest version will be v0.8.0-alpha.1 but no tar ball to install
  • Latest tags v0.8.0-patch.2 v0.8.0-patch.1 -> stripping suffix, but no v0.8.0 with tar ball
    This PR uses git ls-remote to query the latest tags of meshery and exclude all the tags with suffices alpha, beta, patch, and rc

- Releases with patch, alpha, beta, and rc will not generate tar files.
  install script needs to check with meshery repo for the latest stable
  release before continue

Signed-off-by: Phuong Dao <[email protected]>
Copy link

welcome bot commented Aug 25, 2024

Yay, your first pull request! 👍 A contributor will be by to give feedback soon. In the meantime, please review the Newcomers' Guide and sure to join the community Slack.
Be sure to double-check that you have signed your commits. Here are instructions for making signing an implicit activity while peforming a commit.

@github-actions github-actions bot added area/lifecycle Lifecycle management (install, uninstall, configure) related area/website labels Aug 25, 2024
Copy link

netlify bot commented Aug 25, 2024

Deploy Preview for mesheryio-preview ready!

Name Link
🔨 Latest commit 1177ab6
🔍 Latest deploy log https://app.netlify.com/sites/mesheryio-preview/deploys/66cb0c163fa8d500081395e0
😎 Deploy Preview https://deploy-preview-1886--mesheryio-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Ashparshp
Copy link

@da0p, Thanks for your contribution, let's discuss this on the website's call. Please add this as an agenda item to the meeting minutes.

@da0p
Copy link
Author

da0p commented Aug 27, 2024

@Ashparshp Thanks! Is there another way we can discuss it? I am usually not available at the time of the websites meeting

@Ashparshp
Copy link

@vishalvivekm //

LAST_MESHERY_VERSION=`echo $MESHERY_VERSION | awk -F '-patch' '{print $1}'`
# For patch/alpha/beta/rc releases, the meshery tar ball will not be generated, so fall back to last stable release
if [[ "$MESHERY_VERSION" =~ .+-(patch|alpha|beta|rc) ]] ; then
LAST_MESHERY_VERSION=$(git ls-remote --tags https://github.com/meshery/meshery | grep -v -E 'patch|alpha|beta|rc' | tail -1 | sed -E "s/(.+)(v.+)/\2/")
Copy link
Contributor

@hexxdump hexxdump Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces dependency on git command. We need to add a command_exists check for git as well.

We wanted to get away from git API calls also, but looks like its unavoidable, unless we support another direct API to get last stable build similar to "https://docs.meshery.io/project/releases/latest"
Please check whats the issue with the latest beta release, as we had tar balls available for beta and rc builds earlier.
#1704 (comment)

Also, the earlier fix wont work, if the patch release is >1 or the base version's tar is not available.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@da0p will you be incorporating this feedback?

Copy link

stale bot commented Oct 5, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Oct 5, 2024
@stale stale bot removed the issue/stale Issue has not had any activity for an extended period of time label Oct 17, 2024
Copy link

stale bot commented Nov 19, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Nov 19, 2024
Copy link

stale bot commented Nov 27, 2024

This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.

@stale stale bot closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lifecycle Lifecycle management (install, uninstall, configure) related area/website issue/stale Issue has not had any activity for an extended period of time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants